<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>[title]</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="__STATIC__/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="__STATIC__/admin/layuiadmin/style/admin.css" media="all">
  <script src="__STATIC__/echarts/echarts.js"></script>
  <script src="__STATIC__/admin/js/jquery-1.8.3.min.js"></script>
  <script src="__STATIC__/mods/notify_stand.js"></script>
</head>
<script>
  function clickimg(obj,img_tis){
    var img=$('#'+img_tis).val();
    console.log(img)
    var imgs=img.split(',');
    var arr=new Array();
    for(var i=0;i<imgs.length;i++){
      if(imgs[i]){
        if(i!=$(obj).index()){
        arr.push(imgs[i]);
      }
      }
    }
    $(obj).parent().remove();
    console.log(arr);
    $('#'+img_tis).val(arr.join(','));
    notify.success("操作成功", 'topRight');
}
function previewImg(obj) {
    var img = new Image(); 
    img.src = obj.src;
    //var height = img.height + 50; // 原图片大小
    //var width = img.width; //原图片大小
    var imgHtml = "<img src='" + obj.src + "' width='500px' height='500px'/>"; 
    //弹出层
    layer.open({ 
      type: 1, 
      shade: 0.8,
      offset: 'auto',
      area: [501 + 'px',551+'px'], // area: [width + 'px',height+'px'] //原图显示
      shadeClose:true,
      scrollbar: false,
      title: "图片预览", //不显示标题 
      content: imgHtml, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响 
      cancel: function () { 
        //layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', { time: 5000, icon: 6 }); 
      } 
    }); 
  }
</script>
<style>
  .previewImg{
    width: 100px;
    cursor:pointer;
  }
  .layui-btn_text{
    color: #009688;
    cursor:pointer;
  }
  .layui-btn_text-danger{
    color: #FF5722;
  }
  .layui-btn_text-danger:hover {
    color: #ff3c00;
}
.imgs_posi{
    position: relative;
    width: 200px;
    float: left;
  }

  .imgs_posi img{
    width: 100%;
  }
  .img_ab{
    position: absolute;
    right: 10px;
    top:5px;
    background-color: aliceblue;
    color: #333;
    font-size: 16px;
    height: 20px;
    line-height: 20px;
    width: 20px;
    text-align: center;
    border-radius: 20px;
    cursor: pointer;
  }
  .layui-elem-quote{
    overflow: hidden;
  }
</style>